import {
  submitFeedbackApi,
  reportCommentApi,
  shieldCommentApi,
} from '@/api/public/public.js'

const state = {
  tabbar: 0,
}
const getters = {}
const mutations = {
  SET_TABBAR: (state, data) => {
    state.tabbar = data //如果targetUser有内容就赋给状态信息
  },
}
const actions = {
  // 平台意见反馈
  async submitFeedback({ commit }, data) {
    const res = await submitFeedbackApi(data)
    return res
  },
  // 用户举报评论
  async reportComment({ commit }, data) {
    const res = await reportCommentApi(data)
    return res
  },
  // 用户屏蔽评论
  async shieldComment({ commit }, data) {
    const res = await shieldCommentApi(data)
    return res
  },
}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions,
}
